package com.java.rabbitmq.consumer.service;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author Woo_home
 * @create 2020/5/28 21:25
 */

@Component
public class BlogService {

    @RabbitListener(queues = "BlogQueue")
    public void receiverJava(String msg) {
        System.out.println("收到的 Java 消息是：" + msg);
    }

    @RabbitListener(queues = "BlogDotNetQueue")
    public void receiverDotNet(String msg) {
        System.out.println("收到的 DotNet 消息是：" + msg);
    }

    @RabbitListener(queues = "BlogAllQueue")
    public void receiverAll(String msg) {
        System.out.println("收到的 All 消息是：" + msg);
    }
}
